import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lucide:layout-dashboard',
      order: 999,
      title: $t('page.basic.title'),
    },
    name: 'BasicLayout',
    path: '/basic',
    children: [
      {
        name: 'StaffList',
        path: '/staff/index',
        component: () => import('#/views/staff/index.vue'),
        meta: {
          title: $t('page.staff.list'),
        },
      },
      {
        name: 'StaffDetail',
        path: '/staff/detail/:id',
        component: () => import('#/views/staff/detail.vue'),
        meta: {
          activePath: '/staff',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.staff.detail'),
        },
      },
      {
        name: 'StaffEdit',
        path: '/staff/edit/:id',
        component: () => import('#/views/staff/edit.vue'),
        meta: {
          activePath: '/staff',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.staff.edit'),
        },
      },
      {
        name: 'StaffCreate',
        path: '/staff/create',
        component: () => import('#/views/staff/create.vue'),
        meta: {
          activePath: '/staff',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.staff.create'),
        },
      },
      {
        name: 'StaffAuth',
        path: '/staff/auth/index',
        component: () => import('#/views/staff/auth/index.vue'),
        meta: {
          affixTab: true,
          title: $t('page.staff.auth'),
        },
      },
      {
        name: 'StaffAuthCreate',
        path: '/staff/auth/create',
        component: () => import('#/views/staff/auth/create.vue'),
        meta: {
          activePath: '/staff',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.staff.auth'),
        },
      },
    ],
  },
];

export default routes;
